<?php
namespace Home\Controller;
class CityController extends LoginController{
	function index(){
        $this->getip();
        $Ip = new \Org\Net\IpLocation('qqwry.dat');
        $ip = get_client_ip();
        $arr = $Ip->getlocation($ip);
        $country = $arr["country"];
        $city = iconv("GB2312","UTF-8",$country);
        $arr = explode(省,$city);
        $data=$arr["1"];
        $Ob=M("City");
        $arr = $Ob->where("name='$data'")->find();
        $this->assign('arr',$arr);
        $this->display();
    }
}